﻿
-- ================================================
-- Remarks: Not part of standard Stored Proc
-- ================================================
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'Ivy_FeedbackUser_GetByEmail')
	BEGIN
		DROP  Procedure  Ivy_FeedbackUser_GetByEmail
	END

GO

CREATE PROCEDURE Ivy_FeedbackUser_GetByEmail
-- =============================================
-- Author:		<Ram praves kr>
-- Create date: <31.05.2016>
-- Description:	<FeedbackGetByEmail>
-- =============================================
-- Add the parameters for the stored procedure here
	(
				@FeedbackUserEmail varchar(50),
				
				@Sys_IsDeleted int = 0,
				@Sys_OrganizationID int = -1
	)
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT OFF;

    -- Insert statements for procedure here
	SELECT  [FeedbackUserKey],
			[FeedbackUserName],
			[FeedbackUserEmail],
			[RegisteredUserKey],
			[Sys_DateOfCreation],
			[Sys_DateOfModification],
			[Sys_CreatedByID],
			[Sys_ModifiedByID],
			[Sys_DeleteType],
			[Sys_IsDeleted],
			[Sys_OrganizationID],
			[Sys_InitialPrimaryKeys],
			[Sys_WorkstationName]
	FROM    [FeedbackUser]
	WHERE	
		(
			[FeedbackUserEmail]=@FeedbackUserEmail AND
			[Sys_IsDeleted]=@Sys_IsDeleted		   AND
			[Sys_OrganizationID]=@Sys_OrganizationID
		)
END
GO
